#include <cstdlib>
#include "Curses.h"
#include "Core.h"
#include "Window.h"
#include "MapWindow.h"
#include "Level.h"

void testColors() {
	for (int i = 0; i <= COLORS; i++) {
		attron(COLOR_PAIR(i));
		printw("test %d\n", i);
		attroff(COLOR_PAIR(i));
	}
	getch();
	Curses::instance().shutdown();
	exit(0);
}

int main (int argc, char * const argv[]) {

	// Set the terminal to 16 color mode.
	setenv("TERM", "xterm-16color", 1);

	Curses curses = Curses::instance();

	for (int i = 0; i <= COLORS; i++) {
		init_pair(i, i, COLOR_BLACK);
	}

//	testColors();

	Core::instance().inputLoop();

	curses.shutdown();
	return 0;
}
